home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
COMMADIO
/
PYROMNT.LZH
/
SV.LZH
/
SV.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1989-11-20
|
4KB
|
128 lines
PROGRAM SetVideo; { Version 1.10 }
{
┌──────────────────────────────────────────────────────┬──────────────────┐
│ Pinnacle Software's Video Setter │ SV.PAS │
├──────────────────────────────────────────────────────┴──────────────────┤
│ C O P Y R I G H T (C) 1989 BY P I N N A C L E S O F T W A R E │
│ P.O. Box 386, Town of Mount Royal, Montreal, Quebec, Canada H3P 3C6 │
├─────────────────────────────────────────────────────────────────────────┤
│ This Pinnacle Software product may not be resold. It may be given away │
│ or a small distribution fee (not to exceed $10) may be charged. Fail- │
│ ure to comply with these terms may cause warts. │
└─────────────────────────────────────────────────────────────────────────┘
}
{
Change Log
──────────
1.10 Added OK parameter to skip "Enter if okay" prompt.
Cosmetic changes.
}
USES CRT;
CONST
Cop : STRING[80] =
' By Pinnacle Software, PO Box 163 Cartierville, Quebec, Canada H4K 2J5';
VAR
Choice : CHAR;
OrigMode : INTEGER;
Parameter : STRING[80];
FUNCTION Upper(msg : STRING) : STRING;
VAR
cntr : BYTE;
BEGIN
IF LENGTH(msg) <> 0 THEN FOR cntr := 1 TO LENGTH(msg) DO
msg[cntr] := UPCASE(msg[cntr]);
Upper := msg;
END;
BEGIN
IF (ParamStr(1) = '?')
OR (Upper(ParamStr(1)) = 'HELP')
OR (Upper(ParamStr(1)) = '/H')
THEN
BEGIN
WRITELN;
WRITELN('For menu-driven operation, enter: SV');
WRITELN;
WRITELN('This program can also be called with the video option on the command line.');
WRITELN;
WRITELN('For example: SV E');
WRITELN;
WRITELN('To skip the verification step, add "OK" to the command line.');
WRITELN;
WRITELN('For example: SV E OK');
WRITELN;
HALT;
END;
IF LENGTH(PARAMSTR(1)) = 0 THEN
BEGIN
CLRSCR;
WRITELN('┌─────────────────────────────────┐');
WRITELN('│ PRESS A KEY TO SELECT AN EFFECT │');
WRITELN('└─────────────────────────────────┘');
WRITELN;
WRITELN('KEY COLS ROWS COLOR VIDEO CARD');
WRITELN('═══ ════ ════ ═════ ══════════');
WRITELN(' X 40 x 25 B & W CGA color');
WRITELN(' Y 40 x 25 Color CGA color');
WRITELN(' B 80 x 25 B & W CGA color');
WRITELN(' K 80 x 25 Color CGA color');
WRITELN(' M 80 x 25 B & W Monochrome');
WRITELN(' E 80 x 43 Color EGA color');
WRITELN(' V 80 x 50 Color VGA color');
WRITELN;
WRITELN('┌─────────────────────────────────┐');
WRITELN('│ C = Clear Screen Q = Quit │');
WRITELN('└─────────────────────────────────┘');
WRITELN;
WRITE('Your choice: ');
REPEAT
Choice := UPCASE(READKEY);
UNTIL POS(Choice,'XYBKMEVCQ') > 0;
WRITELN(Choice);
END
ELSE
BEGIN
Parameter := PARAMSTR(1);
Choice := UPCASE(Parameter[1]);
END;
OrigMode := LastMode;
CASE Choice OF
'X' : TextMode(BW40);
'Y' : TextMode(CO40);
'B' : TextMode(BW80);
'K' : TextMode(CO80);
'M' : TextMode(MONO);
'E' : TextMode(CO80 + Font8x8);
'V' : TextMode(CO80 + Font8x8);
'Q' : BEGIN WRITELN; WRITELN('Nothing done.'); END;
'C' : CLRSCR;
ELSE
WRITELN;
WRITELN(Choice,' is not a valid option.');
WRITELN;
WRITELN('Nothing done.');
END;
IF (POS(Choice,'CQ') = 0)
AND (Upper(ParamStr(2)) <> 'OK')
THEN
BEGIN
CLRSCR;
WRITELN('Press ENTER if everything looks okay.');
WRITELN;
WRITE ('Press another key to restore last mode.');
Choice := READKEY;
WRITELN;
IF Choice <> #13 THEN TextMode(OrigMode);
END;
END.